package com.hong.spring.mvc.log4j;






import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping("/log4j")
public class Log4jController {
  //private static final Logger LOGGER = LoggerFactory.getLogger(Log4jController.class);

  @RequestMapping(value = "/home",method = RequestMethod.GET)
  public String home(ModelMap model) {
//    LOGGER.info("info级别日志");
//    LOGGER.error("error级别日志");
//    LOGGER.debug("debug级别日志");
    model.addAttribute("message","Hello home");
    return "home";
  }

}